<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>网站后台管理中心- Powered by UUASK</title>
<link rel="shortcut icon" href="/favicon.ico" />
<link href="/<?php echo C('UU_ADMINTPL_DIR');?>/public/css/common.css" rel="stylesheet" type="text/css">
<script src="/<?php echo C('UU_ADMINTPL_DIR');?>/public/js/jquery.min.js"></script>
<script src="/<?php echo C('UU_ADMINTPL_DIR');?>/public/js/jquery.highlight-3.js"></script>
<script src="/<?php echo C('UU_ADMINTPL_DIR');?>/public/js/jquery.vtip-min.js"></script>
<script src="/<?php echo C('UU_ADMINTPL_DIR');?>/public/js/jquery.dialog.js"></script>
<!--[if lt IE 9]>
  <script type="text/javascript" src="/<?php echo C('UU_ADMINTPL_DIR');?>/public/js/PIE.js"></script>
  <script type="text/javascript">
    (function($){
        $.pie = function(name, v){
            // 如果没有加载 PIE 则直接终止
            if (! PIE) return false;
            // 是否 jQuery 对象或者选择器名称
            var obj = typeof name == 'object' ? name : $(name);
            // 指定运行插件的 IE 浏览器版本
            var version = 9;
            // 未指定则默认使用 ie10 以下全兼容模式
            if (typeof v != 'number' && v < 9) {
                version = v;
            }
            // 可对指定的多个 jQuery 对象进行样式兼容
            if ($.browser.msie && obj.size() > 0) {
                if ($.browser.version*1 <= version*1) {
                    obj.each(function(){
                        PIE.attach(this);
                    });
                }
            }
        }
    })(jQuery);
    if ($.browser.msie) {
      $.pie('.pie_about');
    };
  </script>
<![endif]-->
<script src="/<?php echo C('UU_ADMINTPL_DIR');?>/public/js/jquery.disappear.tooltip.js"></script>
<script src="/<?php echo C('UU_ADMINTPL_DIR');?>/public/js/common.js"></script>
</head>
<body>
<div class="allpagetop">用户管理<strong>/</strong>列表</div>
<div class="admin_main_nr_dbox">
 	    <div class="pagetit">
	        <div class="ptit">用户</div>
				<div class="topnav">
			         
					  <a href="<?php echo RU('user/lists',array('isadmin'=>''));?>" <?php if($_GET['isadmin']== ''): ?>class="select"<?php endif; ?>>全部</a>
					   
					  <a href="<?php echo RU('user/lists',array('isadmin'=>0));?>" <?php if($_GET['isadmin']== '0'): ?>class="select"<?php endif; ?>>普通</a>
				 	  <a href="<?php echo RU('user/lists',array('isadmin'=>1));?>" <?php if($_GET['isadmin']== '1'): ?>class="select"<?php endif; ?>>管理员</a>
					   
				    <div class="clear"></div>
				</div>
	        <div class="clear"></div>
	    </div>
		
  
    <form id="form1" name="form1" method="post" action="<?php echo RU('user/allsave');?>">

	  <div class="admin_list_th">
	    <div class="td1" style=" width:15%;"> 
		  <label id="chkAll" class="left_txt_td"><input type="checkbox" name="chkAll"  id="chk" title="全选/反选" />用户名</label>		 
		</div>
		<div class="td4" style=" width:10%;">头像</div>
		<div class="td4" style=" width:10%;">手机号</div>
		<div class="td4" style=" width:5%;">禁言</div>
		<div class="td4" style=" width:5%;"><?php echo C('UU_GOLD_BYNAME');?></div>
		<div class="td4" style=" width:5%;">经验</div>
		<div class="td2" style=" width:5%;">采纳率</div>
		<div class="td2" style=" width:10%;">注册时间</div>
		<div class="td3" style=" width:10%;">最后登录</div>
		<div class="td2 admin_list_center" style=" width:10%;">问题/文章</div>
		<div class="td2 admin_list_center" style=" width:5%;">管理员</div>
		<div class="td5" style=" width:10%;">
		<div class="admin_list_right">操作</div>
		</div>
	  <div class="clear"></div>
	  </div>
	  
	  
	  
	  
	  
	    <?php if(is_array($lists["list"])): $i = 0; $__LIST__ = $lists["list"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$list): $mod = ($i % 2 );++$i;?><div class="admin_list_tr link_bk">
						<div class="td1" style=" width:15%;">
							  <div class="left_txt_td striking">
						 
									<input name="uid[]" type="checkbox" id="uid" value="<?php echo ($list["uid"]); ?>"  />
									<span class="userLV">LV<?php echo ($list["exp_lv"]); ?></span>
									<a href="<?php echo ($list["url"]); ?>" target="_blank"><?php echo ($list["username"]); ?></a>
							  </div>
						</div>
						<div class="td4" style=" width:10%;">
						 <img src="<?php echo ($list["avatar"]); ?>" border="0" align="absmiddle" style="width:32px; height:32px; border-radius:50%;">
						</div>
						<div class="td4 striking" style=" width:10%;">
						 <?php echo ((isset($list["mobile"]) && ($list["mobile"] !== ""))?($list["mobile"]):"未填写"); ?>
						</div>
						<div class="td4" style=" width:5%;">
						<?php if(empty($list["ban"])): ?>否
						<?php else: ?> 
						<span style="color:#FF6600">是</span><span class="view vtip" title="禁言类型：<?php echo ($list["ban"]["txt"]); ?><br>开始时间：<?php echo ($list["ban"]["addtime_str"]); ?><br>结束时间：<?php echo ($list["ban"]["endtime_str"]); ?>">&nbsp;&nbsp;</span><?php endif; ?> 
						</div>
						<div class="td4" style=" width:5%;"><span class="admingold"><?php echo ($list["gold"]); ?></span></div>
						<div class="td4" style=" width:5%;"><?php echo ($list["exp"]); ?></div>
					 	<div class="td4" style=" width:5%;"><?php echo ($list["acc_rate"]); ?>%</div>
						<div class="td4" style=" width:10%;"><?php echo ($list["reg_time_str"]); ?></div>
						<div class="td4" style=" width:10%;"><?php echo ($list["last_login_time_str"]); ?></div>
						<div class="td4 admin_list_center" style=" width:10%;"><?php echo ($list["count_question"]); ?>/<?php echo ($list["count_article"]); ?></div>
						<div class="td2 admin_list_center" style=" width:5%;">
						<?php if($list["isadmin"] == '1' ): ?><span style="color:#FF0000">是</span>
						<?php else: ?> 否<?php endif; ?>
						</div>
						
						<div class="td5" style=" width:10%;">
									  <div class="admin_list_right link_blue">
									 <a href="<?php echo RU('user/delete',array('uid'=>$list['uid']));?>" onclick="return confirm('同时删除他的问答和文章等信息，你确定要删除吗？')">删除</a>
									  </div>
						</div>
					  <div class="clear"></div>
					  </div><?php endforeach; endif; else: echo "" ;endif; ?>
	  
	
	  <div id="J_ban_from"></div>
	  <div id="J_isadmin_from"></div>
      </form> 

  
  
    <?php if(empty($lists["list"])): ?><div class="admin_list_no_info">没有任何信息！</div><?php endif; ?>
	
	
	
	<div class="admin_list_foot">
			  <div class="btnbox">
			 	 <input type="button"  class="admin_submit"   value="禁言" id="J_btn_ban"/>
				 <input type="button"  class="admin_submit"   value="类型" id="J_isadmin_ban"/>
				 <input type="button"  class="admin_submit"   id="J_btn_del"  value="删除 "/>
			  </div>
			  
			   
	          <div class="footso">
			  			<form action="<?php echo RU('user/lists');?>" method="get">
						<div class="sobox">
							<input name="key" type="text"  class="sinput" maxlength="10" value="<?php echo ($_GET['key']); ?>"/>
							<input name="key_type" id="J_key_type_id" type="hidden" value="<?php echo ((isset($_GET['key_type']) && ($_GET['key_type'] !== ""))?($_GET['key_type']):"1"); ?>" />
							<input name="key_type_cn" id="J_key_type_cn" type="hidden" value="<?php echo ((isset($_GET['key_type_cn']) && ($_GET['key_type_cn'] !== ""))?($_GET['key_type_cn']):"标题"); ?>" />
							<input name="" type="submit" value=""  class="sobtn"/>
							<div class="sotype" id="J_key_click"><?php echo ((isset($_GET['key_type_cn']) && ($_GET['key_type_cn'] !== ""))?($_GET['key_type_cn']):"用户名"); ?></div>
							
							
							
							
							
							<div class="mlist" id="J_mlist">
							<ul>
							<li id="1" title="用户名">用户名</li>
							<li id="2" title="UID">UID</li>
							<li id="3" title="手机号">手机号</li>
							</ul>
							</div>
						</div>
						</form>
			  </div>
			  
	          
	</div>
  <div class="uupage"><?php echo ($lists["page"]); ?></div>
  
</div>
<div class="footer link_lan">
Powered by <a href="http://www.zgxmall.com" target="_blank"><span style="color:#009900">中港星企业服务</span><span style="color: #FF3300">论坛</span></a> <?php echo C('UU_VERSION');?>
</div>
</body>
</html>

 

<div id="J_ban_select" style="display:none">

  <div class="showdialog">
 				<div class="dtit">将所选用户禁言：</div>
				
				<div class="dtxt">
						<div class="imgradio">
							<input name="ban" type="hidden" value="1" />
							<input name="bantxt" type="hidden" value="禁言一天" />
							<div class="radio select" data="1" data1="禁言一天">禁言一天</div>
							 
							<div class="radio" data="3" data1="禁言三天">禁言三天</div>
							 
							<div class="radio" data="7" data1="禁言七天">禁言七天</div>
							 
							<div class="radio" data="30" data1="禁言一月">禁言一月</div>
							 
							<div class="radio" data="0" data1="永久禁言">永久禁言</div>
							 
							<div class="radio" data="-1" data1="解除禁言">解除禁言</div>
							<div class="clear"></div>
						</div>
				</div>
 
		
				   <div class="dtxt">
				   <input type="button"  class="admin_submit"   value="确定选择" id="J_save_ban_btn"/>
				   </div>
  </div>
	  
</div>



<div id="J_isadmin_select" style="display:none">

  <div class="showdialog">
 				<div class="dtit">将所选用户设置为：</div>
				
				<div class="dtxt">
						<div class="imgradio">
							<input name="isadmin" type="hidden" value="0" />
							<div class="radio select" data="0">普通用户</div>
							 <div class="clear"></div>
							<div class="radio"        data="1">管理员</div>
					
							<div class="clear"></div>
						</div>
				</div>
 
		
				   <div class="dtxt">
				   <input type="button"  class="admin_submit"   value="确定选择" id="J_save_isadmin_btn"/>
				   </div>
  </div>
	  
</div>


<script type="text/javascript">
    $(document).ready(function()
    {	
 
        //点击批量删除   
        $("#J_btn_del").click(function(){
			
            if (confirm('同时删除他的问答和文章等信息，你确定要删除吗？'))
            {
				$("form[name=form1]").attr("action","<?php echo RU('user/delete');?>").submit();
            }
        });
		//禁言用户
		$("#J_btn_ban").dialog({
		  DialogAddObj:"#J_ban_from",
		  DialogTitle:"禁言用户",
		  DialogContent:"#J_ban_select",
		  DialogContentType:"id"
		});
		//确定禁言
		$('#J_save_ban_btn').live('click',function() {
			$("form[name=form1]").attr("action","<?php echo RU('user/ban');?>").submit();
		});
		//设置用户类型
		$("#J_isadmin_ban").dialog({
		  DialogAddObj:"#J_isadmin_from",
		  DialogTitle:"设置用户",
		  DialogContent:"#J_isadmin_select",
		  DialogContentType:"id"
		});
		//确定用户类型
		$('#J_save_isadmin_btn').live('click',function() {
			$("form[name=form1]").attr("action","<?php echo RU('user/isadmin');?>").submit();
		});
		 
		
    });
</script>
</body>
</html>